﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RealTimeSimulation.CUiRealTimeSimulationCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.RealTimeSimulation;

public class CUiRealTimeSimulationCmd : TxToggleButtonCommand
{
  private CUiRealTimeSimulationCmdEnabler enabler_ = new CUiRealTimeSimulationCmdEnabler();
  private bool isPushed_;
  private CApRealTimeSimulationApp realTimeSimApp_ = new CApRealTimeSimulationApp();

  public virtual string Name => StringTable.REAL_TIME_SIMULATION_NAME;

  public virtual string Bitmap => "RealTimeSimulation.RealTimeSimIcon.bmp";

  public virtual string Category => StringTable.REAL_TIME_SIMULATION_CATEGORY;

  public virtual void Execute(object cmdParams)
  {
    this.isPushed_ = !this.isPushed_;
    if (this.isPushed_)
      this.realTimeSimApp_.Start();
    else
      this.realTimeSimApp_.Stop();
  }

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.enabler_;

  public virtual bool Push => this.isPushed_;
}
